extends Control

## var next_level: PackedScene = preload("res://scenes/levels/level_1.tscn")
## change
var settings_menu: PackedScene = preload("res://scenes/ui/menu/settings.tscn")

func _ready():
	print("Particles!")
	$CPUParticles2D.emitting = true

func _on_menu_pressed():
	get_tree().change_scene_to_file("res://scenes/ui/menu/level_choise_menu.tscn")

func _on_next_level_pressed():
	GlobalVar.exit_door_open = false
	if GlobalVar.current_level == 1:
		GlobalVar.current_level = 2 as int
		get_tree().change_scene_to_file("res://scenes/levels/level_2.tscn")
	elif GlobalVar.current_level == 2:
		pass
	else:
		push_error("No level found")


func _on_settings_pressed():
	add_child(settings_menu.instantiate())

